Database facility for XML server pages language

ABSTRACT

A method and computer program product for generating XML documents that include data content and style information from a plurality of data sources. A first file includes control statements that reference at least one resource containing display information. A server pages processor executes a script that includes a control statement referencing the first file, wherein the first file includes references to a plurality of resources containing display information. The resources may reside in at least two different locations in a computer system network.

CROSS REFERENCE TO RELATED APPLICATION

[0001] This application is a continuation of U.S. patent applicationSer. No. 09/399,506, which was filed on Sep. 20, 1999 by the sameinventors as the instant application.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] This invention generally relates to page display softwarelanguages for programmers on the World Wide Web. More specifically, thisinvention relates to providing uniform content and style informationfrom a central location to display pages.

[0004] 2. Description of the Related Art

[0005] A significant development in computer networking is the Internet,which is a sophisticated worldwide network of computer systems. A userat an individual PC (i.e., workstation) that wishes to access theInternet typically does so using a software application known as a webbrowser. A web browser uses a standardized interface protocol, such asHyperText Transfer Protocol (HTTP), to make a connection via theInternet to other computers known as web servers, and to receiveinformation from the web servers that is displayed on the user'sdisplay. Information displayed to the user is typically organized intopages that are constructed using a specialized language such asHypertext Markup Language (HTML), Extensible Markup Language (XML), andWireless Markup Language (WML), hereinafter (markup languages). Markuplanguages are typically based on the Standard Generalized MarkupLanguage (SGML) that was created with the original purpose of having onestandard language that could be used to share documents among allcomputers, regardless of hardware and operating system configurations.To this end, markup language files use a standard set of code tagsembedded in their text that describes the elements of a document. Theweb browser interprets the code tags so that each computer having itsown unique hardware and software capabilities is able to display thedocument while preserving the original format of the document. Eachdocument typically resides in a separate file on the server.

[0006] For companies doing world-wide business over the Internet, webpages are translated into the appropriate language and stored ashard-coded HTML and/or active server pages (ASP). Further, businessunits in different countries or regions often target specific productsand/or services for that particular area, requiring customizedinformation on the web pages. Updating the pages may quickly entail anoverwhelming amount of overhead for the business organization.Additional overhead is incurred with the proliferation of specializedmark-up languages having unique syntax for different types of computersystems, such as WML for portable, wireless, telephones and personalcommunication systems. In many instances, the format or style of thepage may be common across servers, especially when a company strives fora unified appearance across their pages, but data on the page may beunique to a specific server.

[0007] There are a number of different web browsers available, eachsupporting their own extensions to markup languages such as HTML. Thus,a document written for one browser may not be interpreted as intended onanother browser if it does not support the same extensions. In manysituations, software developers are forced to create unique documentsfor each browsers, or to include logic in the markup language thatbypasses or executes certain portions of code, depending on whichbrowsers are being supported. This adds another layer of complexity todeveloping and updating these documents.

[0008] XML was designed to meet the requirements of large-scale webcontent providers for industry-specific markup (i.e., encodeddescriptions of a document's storage layout and logical structure),vendor-neutral data exchange, media-independent publishing, one-on-onemarketing, workflow management in collaborative authoring environments,and the processing of web documents by intelligent clients. XML is alsoused in certain metadata applications. XML supports European, MiddleEastern, African, and Asian languages, and all conforming processorssupport the Unicode character set encodings.

[0009] It is therefore desirable to provide a mechanism for using XMLthat allows customized web pages to share format and othercontent/behavior information while providing capability to store data instructured, but flexible collections associated with owners. It is alsodesirable for the markup language to allow users to recombine and re-usedata on many different pages, and to draw on different sources for data.It is also desirable for such a system to support standards provided inXML.

[0010] In the prior art, there are a variety of systems that providelimited content management capability. Some commercially availablecontent management systems such as Vignette, StoryServer and InsoDynabase, typically use templates or page components that aredynamically populated from system query language (SQL) databases andrecombined into pages using pre-defined templates. These systemsgenerally fit well with highly structured sites having many identicallyformatted pages, such as a news site, however, the template structuresare generally fixed and not flexible. Further, in these systems, thedata storage paradigm is based upon filling named slots in thetemplates, which does not lend itself to a flexible data format thatprioritizes the expression of data and its relationships. The templatemodel for such systems is typically based on either Java, or a scriptinglanguage such as VBScript or Tcl/Tk, and limited support is typicallyprovided for XML as a data type.

[0011] Another variety of systems that provide limited contentmanagement capability are Internet application servers such asCOLDFUSION® made by Macromedia, Inc. of San Francisco, Calif. Theseapplication servers are primarily designed to support development ofinteractive applications. Most of the site template structures arehard-coded as server scripts, often using a mixture of standard HTMLtags and proprietary tags that are pre-processed on the server. Eachscript is independent of the others; there is no inheritance mechanism.Even though the scripts are based on tags, the scripts are notwell-formed XML, but rather customized HTML, and the separation of formand data is limited. Further, use of XML in these systems is limited tocomplete source data files.

[0012] Web-enabled object/XML databases such as OBJECTSTORE®/EXCELON®(made by Progress Software Corporation, Bedford, Mass.), POET®(manufactured by Poet Software GmbH, Hamburg, Germany), etc., provide aplatform for high-performance application development around a flexiblerepository, but provide limited development tools. The data modelingcapabilities are flexible and well-suited to free-form web content,however, and there is no high-level scripting language to provide aframework for managing content.

[0013] Traditional non-web content management systems such as INTERLEAF®(made by Interleaf, Inc. of Waltham, Massachussets), ARBORTEXT® (made byArborText of Ann Arbor, Mich.), and TEXCEL® (made by Texcel Systems,Inc. of Wayland, Massachussets) are designed for generic, media-neutralcontent management, and are frequently SGML-based, therefore leading toa natural evolution towards XML. These systems are typically deployedfor maintaining major documentation projects. The output of thesesystems is normally customized for a particular customer, and may bedelivered online, on compact disc, or in print. These systems aredesigned to assemble explicit documents, however, and do not includecapabilities for providing data-driven, script-aided document delivery.

[0014] One other system for populating pages includes using ASP and SQLwith content selection rules supported by personalization/recommendationsoftware components. This is a relatively simple approach to contentmanagement, however, most of the site template structures are hard-codedin HTML, and thus there is no inheritance mechanism. Additionally, mostof the data is embedded in the pages, and pages are personalized bypopulating pre-defined slots with targeted data. Mass customization ispossible, but there is little flexibility.

SUMMARY OF THE INVENTION

[0015] In one embodiment, the present invention provides a method forgenerating XML documents that include data content and style informationfrom a plurality of data sources. A first file includes controlstatements that reference at least one resource containing displayinformation. A server pages processor executes a script that includes acontrol statement referencing the first file, wherein the first fileincludes references to a plurality of resources containing displayinformation. The resources may reside in at least two differentlocations in a computer system network.

[0016] One feature for reducing duplication of display information inthe present invention includes defining default display information inone location that may be included with the display information forresources in other locations.

[0017] Another feature for reducing duplication of display informationin the present invention includes defining a resource class that isassociated with at least one resource. Default display information maybe provided in one location with the class, and the default displayinformation is then included with the display information for eachresource associated with the class.

[0018] Another feature for reducing duplication of display informationin the present invention includes generating a marker resource thatassociates a name with one or more resources. A link is then associatedwith the marker resource and the link may be specified to refer to theat least one resource. This allows two or more resources to refer to thelink to access the display information for the at least one resource.

[0019] Another feature in the present invention includes defining avariant for the at least one resource, wherein the variant provides areference to override display information for the at least one resource.

[0020] In another embodiment, the present invention is implemented inprogram instructions and distributed as a computer program product.

[0021] In another embodiment, the present invention is implemented in acomputer system that executes program instructions for generating XMLdocuments that include display information from a plurality of datasources.

BRIEF DESCRIPTION OF THE DRAWINGS

[0022]FIG. 1 is a block diagram of a computerized information networkwith which the present invention may be utilized.

[0023]FIG. 1a is a block diagram of a computer system with which thepresent invention may be utilized.

[0024]FIG. 2 is a block diagram of a device for generating XML documentsaccording to the present invention.

[0025] The present invention may be better understood, and its numerousobjects, features, and advantages made apparent to those skilled in theart by referencing the accompanying drawings. The use of the samereference symbols in different drawings indicates similar or identicalitems.

DETAILED DESCRIPTION

[0026] Overview of Preliminary Concepts and Definitions

[0027] While the Internet is used herein as an example of how thepresent invention is utilized, it is important to recognize that thepresent invention is also applicable to other information networks thatutilize documents with content represented in a markup language. Forthose who are not familiar with XML, the Internet, the World Wide Web,web servers, and web browsers, a brief overview of these concepts ispresented here.

[0028] An example of a typical Internet connection found in the priorart is shown in FIG. 1. A user that wishes to access information on theInternet typically has a computer workstation 112, also referred to as“the client workstation”, that executes an application program known asa web browser 114. Workstation 112 establishes a communication link 116with web server 118 such as a dial-up wired connection with a modem, adirect link such as a T1 or ISDN line, a wireless connection through acellular or satellite network, or a local data transport system such asEthernet or token ring over a local area network. When the user enters arequest for information by entering/commands in web browser 114,workstation 112 sends a request for information, such as a search fordocuments pertaining to a specified topic, or a specific web page to webserver 118. Each web server 118, 120, 122, 124 on the Internet has aknown address which the user must supply to the web browser 114 in orderto connect to the appropriate web server 118, 120, 122, or 124. If theinformation is available on the user's web server 118, a central linksuch as backbone 126 allows web servers 118, 120, 122, 124 tocommunicate with one another to supply the requested information.Because web servers 118, 120, 122, 124 can contain more than one webpage, the user will also specify in the address which particular webpage he wants to view. The address, also known as a universal resourcelocator (URL), of a home page on a server is a series of numbers thatindicate the server and the location of the page on the server,analogous to a post office address. For simplicity, a domain name systemwas developed that allows users to specify servers and documents usingnames instead of numbers. A URL may further specify a particular page ina group of pages belonging to a content provider by including additionalinformation at the end of a domain name.

[0029] The web servers 118, 120, 122, 124 execute a web serverapplication program which monitors requests, services requests for theinformation on that particular web server, and transmits the informationto the user's workstation 112. Workstation 112 and/or web servers 116are computer systems, such as computer system 130 as shown in FIG. 1a.Computer system 130 includes central processing unit (CPU) 132 connectedby host bus 134 to various components including main memory 136, storagedevice controller 138, network interface 140, audio and videocontrollers 142, and input/output devices 144 connected via input/output(I/O) controllers 146. Those skilled in the art will appreciate thatthis system encompasses all types of computer systems including, forexample, mainframes, minicomputers, workstations, servers, personalcomputers, Internet terminals, network appliances, notebooks, palm tops,personal digital assistants, and embedded systems. Typically, computersystem 130 also includes cache memory 150 to facilitate quicker accessbetween processor 132 and main memory 136. I/O peripheral devices ofteninclude speaker systems 152, graphics devices 154, and other I/O devices144 such as display monitors, keyboards, mouse-type input devices,floppy and hard disk drives, DVD drives, CD-ROM drives, and printers.Many computer systems also include network capability, terminal devices,modems, televisions, sound devices, voice recognition devices,electronic pen devices, and mass storage devices such as tape drives.The number of devices available to add to personal computer systemscontinues to grow, however computer system 130 may include fewercomponents than shown in FIG. 1a and described herein.

[0030] The peripheral devices usually communicate with processor 132over one or more buses 134, 156, 158, with the buses communicating witheach other through the use of one or more bridges 160, 162. Computersystem 130 may be one of many workstations or servers connected to anetwork such as a local area network (LAN), a wide area network (WAN),or a global information network such as the Internet through networkinterface 140.

[0031] CPU 132 can be constructed from one or more microprocessorsand/or integrated circuits. Main memory 136 stores programs and datathat CPU 132 may access. When computer system 130 starts up, anoperating system program is loaded into main memory 136. The operatingsystem manages the resources of computer system 130, such as CPU 132,audio controller 142, storage device controller 138, network interface140, I/O controllers 146, and host bus 134. The operating system readsone or more configuration files to determine the hardware and softwareresources connected to computer system 130.

[0032] Storage device controller 138 allows computer system 130 toretrieve and store data from mass storage devices such as magnetic disks(hard disks, diskettes), and optical disks (DVD and CD-ROM).

[0033] One skilled in the art will recognize that the foregoingcomponents and devices are used as examples for sake of conceptualclarity and that various configuration modifications are common. Forexample, audio controller 142 is connected to PCI bus 156 in FIG. 1a,but may be connected to the ISA bus 138 or reside on the motherboard(not shown) in alternative embodiments. As further example, althoughcomputer system 130 is shown to contain only a single main CPU 132 and asingle system bus 134, those skilled in the art will appreciate that thepresent invention may be practiced using a computer system that hasmultiple CPUs 132 and/or multiple busses 134. In addition, theinterfaces that are used in the preferred embodiment may includeseparate, fully programmed microprocessors that are used to off-loadcomputationally intensive processing from CPU 132, or may includeinput/output (I/O) adapters to perform similar functions. Further, PCIbus 156 is used as an exemplar of any input-output devices attached toany I/O bus; AGP bus 159 is used as an exemplar of any graphics bus;graphics device 154 is used as an exemplar of any graphics controller;and host-to-PCI bridge 160 and PCI-to-ISA bridge 162 are used asexemplars of any type of bridge. Consequently, as used herein thespecific exemplars set forth in FIG. 1a are intended to berepresentative of their more general classes. In general, use of anyspecific exemplar herein is also intended to be representative of itsclass and the non-inclusion of such specific devices in the foregoinglist should not be taken as indicating that limitation is desired.

[0034] A web page is primarily visual data that is intended to bedisplayed on the display monitor of the user's workstation 112. When webserver 118 receives a web page request, it will transmit a document,generally written in a markup language such as HTML or XML, acrosscommunication link 116 to the requesting web browser 114. Web browser114 interprets the markup language and outputs the web page to themonitor of user workstation 112. This web page displayed on the user'sdisplay may contain text, graphics, and links (which are addresses ofother web pages.) These other web pages (i.e., those represented bylinks) may be on the same or on different web servers 116. The user cango to these other web pages by clicking on the links using a mouse orother pointing device. This entire system of web pages with links toother web pages on other servers across the world comprises the WorldWide Web.

[0035] Style sheet mechanisms available in markup languages enable styleelements to be consistent across web pages that are related to oneanother (e.g., web pages belonging to a web site of a particularcorporation). For example, HTML uses cascading style sheets (CSS), SGMLuses document style semantics and specification language (DSSSL), andXML uses extensible style language (XSL). XSL is a language forexpressing style sheets in XML, i.e., to express how the structuredcontent of an XML file should be styled, laid out, and paginated ontosome presentation medium such as a window in a web browser or a set ofphysical pages in a book, report, pamphlet, or memo. XSL was developedbecause XML offers greater data display possibilities than HTML. XMLlets authors mark up data with author-defined elements (opening andclosing pairs of tags) that specify the nature of the data. This allowsthe developer to clearly organize customized data structures. The dataelements can be displayed with consistent formatting in different placeson one document or across a series of documents. XML inserts the datumin the appropriate location, and XSL allows for more complex formattingthan style sheet mechanisms associated with other markup languages.

[0036] XML enables users to create unique tags that identify theirinformation in more meaningful ways than simply applying a basic set ofmarkup language tags to all documents. To accomplish this, XML providesa namespace feature, which allows the user to specify addresses toprovide a unique context to tags and attributes.

[0037] An XSL style sheet processor accepts a document or data in XMLand an XSL style sheet, and produces the presentation of that XML sourcecontent as specified by the style sheet. The presentation processincludes transforming a source tree into a result tree (also known astree transformation), and interpreting the result tree to produce aformatted presentation on a display or other media. By separating thestyle sheet and the data, style or formatting aspects may be modifiedwithout modifying data that is being rendered, and vice versa.

[0038] XSL transformation (XSLT) is a language for tree transformationwhich associates patterns with templates. A pattern is matched againstelements in the source tree. A template is instantiated for a particularsource element to create part of the result tree. When a template isinstantiated, each instruction is executed and replaced by the resulttree fragment that it creates. In constructing the result tree, elementsfrom the source tree can be filtered and reordered, and arbitrarystructure can be added. XSLT uses XML namespaces to distinguish elementsthat are instructions to the XSLT processor from elements that specifyliteral result tree structure.

[0039] A schema specifies the structure of an XML document andconstraints on its content. XML defines rules for defining markuplanguages having tags, while a schema is a formal specification of thegrammar for one markup language. A schema is useful for validating thedocument content and for describing the grammar of the language. Theschema defines the elements that can appear within the document and theattributes that can be associated with an element. XML schemas areextensible and software developers are free to add their own elementsand attributes to XML schema documents. It defines whether an element isempty or can include text. The schema can also define default values forattributes.

[0040] XML includes a feature known as the Document Object Model (DOM)which is an application programming interface (API) for HTML and XMLdocuments. The DOM defines the logical structure of documents and theway a document is accessed and manipulated. In the DOM, programmers canbuild documents, navigate their structure, and add, modify, or deleteelements and content. Many objects found in an HTML or XML document canbe accessed, changed, deleted, or added using the DOM. Documents aremodeled using objects, and the model encompasses not only the structureof a document, but also the behavior of a document and the objects ofwhich it is composed. As an object model, the DOM identifies theinterfaces and objects used to represent and manipulate a document, thesemantics of these interfaces and objects including both behavior andattributes, and the relationships and collaborations among theseinterfaces and objects.

[0041] Description

[0042]FIG. 2 shows a block diagram of server pages processing apparatus200 for generating and processing XML and XSL documents using XML serverpages language (XSP) in accordance with the present invention. Thepresent invention includes the XSP script language, XML databasefacilities (XDB) 201, and XSP processor 202 that interprets scriptswritten in XSP. XDB 201 resides in memory on web servers 116, 118, 120,122, 124 (FIG. 1). The XSP language has control statements associatedwith it for accessing XDB 201 from a script. XSP processor 202 resideson web server 116 (FIG. 1), and on other web servers, as required.

[0043] One way to invoke XSP processor 202 is dynamically, through anonline mechaninization wherein a user submits one or more XSP scriptsfrom client workstation 112 (FIG. 1) to XSP processor 202 through anapplication program interface (API) on web server 116. Examples ofcommonly known interfaces to web server 116 that may be used include theInternet Services Application Programming Interface (ISAPI) and CommonGateway Interface (CGI). The resulting page is then transmitted back toclient workstation 112 and is displayed or output to a selected targetdevice, such as browser 114 (FIG. 1). Another way to invoke XSPprocessor 202 is statically, where a developer submits one or more XSPscripts to XSP processor 202 directly on server 116. The page or pagesthat result from server pages processing apparatus 200 are stored inserver 116 and may be accessed by a client workstation 112 requestingthe URL for the page.

[0044] An XSP script is a document written in XSP and XML that specifiesone or more XML documents as input to XSP processor 202. The output ofserver pages processing apparatus 200 is an XML object that may be awell-formed markup language document that is ready to be input to abrowser, or it may be expressed in another format that is ready for usein a data-interchange process with another system, or for formatting anddelivery to an HTML or non-HTML client.

[0045] XSP script 300 is interpreted by XSP processor 202 as a set ofsubroutines that create XML structures in a result tree. The XMLstructures may be created by querying and transforming one or more XMLdata sources, or by direct inline coding of desired output as atemplate.

[0046] In one embodiment of XSP, all core functionality to support thestructure of the result tree, whether it is an XML electronic datainterchange (EDI) message, or a markup language document derived from anXML document, is implemented in low level “base” scripts. “User” scriptsprovide extensions and/or overwrite low level base scripts. The XML datasets referenced in user scripts determine the final result tree. Thisfeature is known as the inheritance mechanism and it results in a verysmall number of compact scripts being able to support very largewebsites and a wide variety of actual document formats. Inheritance isan object oriented design feature which lets the user define some sharedfunctionality, then override it in specific cases. Thus, a page may bedivided into separate building blocks, with each block being generatedby different XSP scripts. When a change is required in one block, onlythe affected scripts must be changed and the other blocks remain thesame.

[0047] The inheritance mechanism also allows configuration control ofpage formats. For example, developers in different regions may be givenaccess to blocks containing information that is unique to their region,such as information presented in a particular language, or differentproducts that may be available in one region but not others. This allowssoftware developers to change the information that is unique to them,while still maintaining commonality with scripts which generate theblocks that are common with other regions.

[0048] Referring back to FIG. 2, XSP processor 202 generates a first XSPscript document that includes commands specifying XML resourcescontaining the content desired for the page. The first XSP scriptdocument is output to data gathering process 204. Data gathering process204 pulls the content from the sources specified in the first XSPscript, and creates an XML meta-document for the message and content ofthe page. This XML meta-document is independent of the XML style sheetand is not targeted for any specific language or format.

[0049] Data gathering process 204 is capable of retrieving informationfrom a variety of sources and allows developers in a particular regionto specify the most relevant information to display on a given page.Developers may even provide some of the content that is unique to theirarea by utilizing user scripts, where allowed, while maintaining commoncontent and format among all users using base scripts for the otherportions of the page.

[0050] XSP processor 202 also generates a second document which includesa style sheet script for the page. Style sheet builder process 206receives the style sheet script from XSP processor 202 and retrieves allof the documents specified in the style sheet script for formatting thecontent in the meta-document. The output of style sheet builder process206 is an XSL document containing rules to format the meta-document.

[0051] The XSL document and the XML meta-document are input to XSLtransform 208 which searches the hierarchy of modules specified in boththe meta-document and the style sheet and uses the inheritance mechanismto determine which modules to utilize. A template is instantiated forthe source elements specified in the module to create the result tree.When a template is instantiated, each instruction is executed andreplaced by the result tree fragment that it creates.

[0052] The result tree fragments generated in XSL transform 208 areoutput to an XML document and sent to post renderer 210. Post renderer210 converts the XML document to the document format required by thedevice or application software that will be used to display outputdocument 212. Such document format may be one or more of many differentformats including HTML, word processor formats, and WML, based on thetarget specified when an XSP script is initiated in XSP processor 202.

[0053] In accordance with the present invention, XSP scripts includestatements for creating and accessing named and scoped variables,exercising flow control, instantiating and accessing COM objects, andcreating XML data islands with script scope on a web server. XSP scriptsshare control structure syntax with XSL, but place the XSP controlstructure syntax in a different XML namespace to clarify whether XSPprocessor 202 executes the control structure, or whether the controlstructure is handled in another tier of server pages processingapparatus 200. XSP language and XSP processor 202 are further explainedin co-pending U.S. patent application Ser. No. 09/399,451, entitled “XMLServer Pages Language”, which was filed on the same day, and is assignedto the same assignee, as the present application, and is herebyincorporated by reference.

[0054] The XSP language includes control statement <xsp:xdb> forenumerating all or part of XDB 201. XDB 201 includes an image, a link,and a definition database. While performing the enumeration, whenever alink, image, definition or variant node is found, the node's data blockis expanded.

[0055] XDB 201 is a hierarchical database format that is accessed usingXSP and translated into XML and XSL by data gathering process 204 andstylesheet builder 206. XDB 201 can be used to locate a piece of XMLdata using a hierarchical reference. This hierarchical reference istreated much like a path to a file in the hard disk file system. Thereference is made up of a number of “folder” names, ending with a nameto an actual resource within the final “folder”. The resources andfolders are all represented as XML. Folders can be specified both inline(inside the same XML file) and out of line in a separate file. Thisallows developers to build large, but manageable data structures usingXDB.

[0056] XDB 201 begins with a single root file. An example of a root filefor a database of links on a website is: <xdb:xdb xmlns:xdb=“uri:xdb”> <!-- navigation folder is in nav.xdb -->  <xdb:folder name=“navigation”src=“nav.xdb”/> <!-- products folder is inline --> <xdb:foldername=“products”> <xdb:resource name=“home”> <xdb:href>/products/default.htm</xdb:href> <xdb:caption>Products</xdb:caption> </xdb:resource> <xdb:resourcename=“widgets”>  <xdb:href>/products/widgets.htm</xdb:href> <xdb:caption>Widgets</xdb:caption> </xdb:resource> </xdb:folder></xdb:xdb>

[0057] This root file contains two folders: “navigation” and “products”.The “navigation” folder is defined as being in a separate file called“nav.xdb”. This file might then contain folders and link resourcesspecific to navigation. The “products” folder, on the other hand, isshown inline. This folder contains two links—“home” and “widgets”, eachof which provides a physical link location and a simple caption for thelink. The caption might be used to provide the text for a link in thecase where none was explicitly specified where the link was being used.

[0058] Referencing a Resource

[0059] As mentioned previously, resource references to XDB 201 aresimilar to references to files in computer system 130 (FIG. 1a). Thegeneral form of a reference to a resource in XDB 201 is as follows:

[0060] [foldername1:] [foldername2: . . . ]resourcename

[0061] In this case, ‘foldername1’ is a folder within the root XDB file.‘foldername2’ is a folder within ‘foldername1’ and ‘resourcename’ is thename of an xdb:resource within that folder.

[0062] As links can be placed directly into the root file of XDB 201,use of folder references are optional. For example, to get to the twolinks in the earlier example, the two product links would have thesereferences: products:home would return the link to/products/default.htm, and products:widgets would return the link to/products/widgets.htm.

[0063] Definition of External Files

[0064] The navigation folder in the earlier example was defined in anexternal file called “nav.xdb”. An example of such a file is: <xdb:xdbxmlns:xdb=“uri:xdb”>  <xdb:folder name=“search”>   <xdb:resourcename=“home”>    <xdb:href>/search/default.asp</xdb:href>   <xdb:caption>Search</xdb:caption>   </xdb:resource>    <xdb:resourcename=“sitemap”>     <xdb:href>/search/sitemap.htm</xdb.href>    <xdb:caption>Site Map</xdb:caption>    </xdb:resource> </xdb:folder> </xdb:xdb>

[0065] A key point to note from this is that an external XDB folder filelooks structurally identical to the root file—it is has the same kind ofroot node, and is made up of folders containing the same kind ofresources (in this case, links). As the resources in this file areactually within the ‘navigation’ XDB folder, the resources in this fileare referenced using a statement as follows: navigation:search:sitemapwhich returns the link to /search/sitemap.htm.

[0066] Using Folder Defaults to Reduce Duplication

[0067] There is a high potential for duplication of data using thehierarchical XML-based approach of XDB 201. Three approaches to reducingduplication of data that may be implemented with the present inventionare (1) folder defaults, (2) class definitions, and (3) soft links.

[0068] The simplest way to reduce duplication is to only have the datain the file once. For example, if all of the images in a particularfolder are the same width and height, folder defaults provide amechanism for specifying such information at the folder level.

[0069] In practice, without using a folder default, an image database inXDB 201 may look like this: <xdb:xdb xmlns:xdb=“uri:xdb”>  <xdb:resourcename=“home”>   <xdb:src>/images/masthead/home.gif</xdb:src>  <xdb:width>100</xdb:width>   <xdb:height>80</xdb:height>  <xdb:caption>Search</xdb:caption>  </xdb:resource>  <xdb:resourcename=“products”>   <xdb:src>/images/masthead/products.gif</xdb:src>  <xdb:width>100</xdb:width>   <xdb:height>80</xdb:height>  <xdb:caption>Products</xdb:caption>  </xdb:resource> </xdb:xdb>

[0070] When folder defaults are added, the preceding script becomes:<xdb:xdb xmlns:xdb=“uri:xdb”>  <xdb:default>  <xdb:src>/images/masthead/.</xdb:src>   <xdb:width>100</xdb:width>  <xdb:height>80</xdb:height>  </xdb:default>  <xdb:resourcename=“home”>   <xdb:src>home.gif</xdb:src>  <xdb:caption>Search</xdb:caption>  </xdb:resource>  <xdb:resourcename=“products”>   <xdb:src>products.gif</xdb:src>  <xdb:caption>Products</xdb:caption>  </xdb:resource> </xdb:xdb>

[0071] Notice that when defaults are specified, the width, height andfolder of the images in the folder are only specified once, at thefolder level, greatly reducing size and maintenance overhead.

[0072] Using Class Definitions to Reduce Duplication

[0073] While folder defaults work well where all images in the folderbroadly share the same set of defaults, marker class definitions arebetter suited to situations when the folder contains a number ofdifferent kinds of image. A class definition can be used to indicate aresource as being of a certain type or class. For example, an XDBdatabase of an image resource might identify an image resource as beinga “masthead button”. A generalization could be formed for the “mastheadbutton” class resource using the fact that the image is a certain widthor height. As a result, that information does not need to be explicitlyduplicated in the individual image resource. Further, there would be oneplace to maintain the shared data, and many resources in differentfolders can share the same class definition.

[0074] By way of example, consider the following script, which does nothave a class definition: <xdb:xdb xmlns:xdb=“uri:xdb”>  <xdb:foldername=“buttons”>   <xdb:resource name=“home”>   <xdb:src>/images/masthead/home.gif</xdb:src>   <xdb:width>100</xdb:width>    <xdb:height>80</xdb:height>   <xdb:caption>Search</xdb:caption>   </xdb:resource>   <xdb:resourcename=“desktopimage”>    <xdb:src>/images/pcpics/desktop.gif</xdb:src>   <xdb:width>150</xdb:width>    <xdb:height>130</xdb:height>   <xdb:caption>Picture of a Desktop PC</xdb:caption>   </xdb:resource>  <xdb:resource name=“notebookimage”>   <xdb:src>/images/pcpics/notebook.gif</xdb:src>   <xdb:width>150</xdb:width>    <xdb:height>130</xdb:height>   <xdb:caption>Picture of a Notebook PC</xdb:caption>   </xdb:resource> </xdb:folder> </xdb:xdb>

[0075] In the preceding script, the image for the resource “home” has adifferent height and width than the images for the resources“desktopimage” and “notebookimage” in the same folder, so folderdefaults are not an ideal solution for reducing duplication.

[0076] Using a class definition, however, the script file becomes:<xdb:xdb classfile=“imgclass.xdb” xmlns:xdb=“uri:xdb”>  <xdb:foldername=“buttons”>   <xdb:resource name=“home” class=“mastheadbtn”>   <xdb:src>home.gif</xdb:src>    <xdb:caption>Search</xdb:caption>  </xdb:resource>   <xdb:resource name=“desktopimage” class=“pcpic”>   <xdb:src>desktop.gif</xdb:src>    <xdb:caption>Picture of a DesktopPC</xdb:caption>   </xdb:resource>   <xdb:resource name=“notebookimage”class=“pcpic”>>    <xdb:src>notebook.gif</xdb:src>   <xdb:caption>Picture of a Notebook PC</xdb:caption>   </xdb:resource> </xdb:folder> </xdb:xdb>

[0077] There is now no duplication of data, as the image resourcesobtain this information via the class definitions in the file“imgclass.xdb”, which includes the following: <!-- imgclass.xdb --><xdb:xdb xmlns:xdb=“uri:xdb”>  <xdb:class name=“mastheadbtn”>  <xdb:src>/images/masthead/.</xdb:src>   <xdb:width>100</xdb:width>  <xdb:height>80</xdb:height>  </xdb:resource>  <xdb:class name=“pcpic”>  <xdb:src>/images/pcpics/.</xdb:src>   <xdb:width>150</xdb:width>  <xdb:height>130</xdb:height>  </xdb:resource> </xdb:xdb>

[0078] Note that this file contains a single definition of all theinformation previously duplicated. Also note that the class file isactually another file in XDB 201, and thus, the class file can containfolders and be split across several physical files just as any other XDB210 hierarchy can.

[0079] Using Soft Links to Reduce Duplication

[0080] Often when building a hierarchical structure for XDB 201, asituation arises where it is difficult to determine whether a givenresource belongs in one folder or another. For example, a folder thatincluded a resource called “car” could go in a “transportation” folderor a “hobbies” folder. The resource may belong in both folders, but itis not desirable to simply duplicate the data in both folders.

[0081] In one embodiment of the present invention, a solution is tocreate a marker resource with the name of the resource, and assign asoft link to it. For example, an XDB 201 root file for a database oflinks appears as: <xdb:xdb xmlns:xdb=“uri:xdb”>  <xdb:foldername=“transportation”>   <xdb:resource name=“car”>   <xdb:href>/transport/car.htm</xdb:href>   <xdb:caption>Car</xdb:caption>   </xdb:resource>  </xdb:folder> <xdb:folder name=“hobbies”>   <xdb:resource name=“driving”ref=“transporation:car” />  </xdb:folder> </xdb:xdb>

[0082] In addition to the preceding example having two resources, thelink feature could be used to build “libraries” of resources based ontheir type, then use these by reference elsewhere, such as where theresource should be used in a context other than its type, as in the“hobbies” example above.

[0083] Using Variants to Override Properties

[0084] All of the preceding examples result in a resource beingallocated when requested in a script. There may be situations, however,when a substitute or default resource should be allocated if theresource specifically requested is not available. For example, aparticular link to a resource containing text in German is requested,but it is not available. The present invention provides a mechanismreferred to a “variants” for allocating a resource that includes thetext in some other language, for example, English, rather than having noresource allocated at all.

[0085] A variant provides a set of override properties In the precedingexample above, the German variant of the caption could be specified on agiven link as follows: <xdb:xdb xmlns:xdb=“uri:xdb”>  <!-- productsfolder is inline -->  <xdb:folder name=“products”>  <xdb:resourcename=“home”>   <xdb:href>/products/default.htm</xdb:href>  <xdb:caption>Products</xdb:caption>   <xdb:variant name=“de”>   <xdb:caption>Produkte</xdb:caption>   </xdb:variant>  </xdb:resource></xdb:xdb>

[0086] In this case the Products page must be linked with the XDBreference “products:home”, but a variant with a name of “de” has beenadded. When the German variant of this link is desired, the link withthe reference “products:home#de” is used. The ‘#’ means that thesubsequent text is a variant reference.

[0087] In the example above, if a French reference is requested using“products:home#fr”, and no French variant is found, no variant overridewould occur and the text from the resource itself would be supplied.

[0088] The general syntax is for referencing a variant is:

[0089] [foldername1:][foldername2: . . .]resourcename[#variant1[#variant2] . . . ]

[0090] As further levels of variants are added, they are nested withinthe given variant definition. For example, Swiss German text isrequested using “products:home#de#ch” for the following XDB structure:<xdb:resource name=“home”>  <xdb:href>/products/default.htm</xdb:href> <xdb:caption>Products</xdb:caption>  <xdb:variant name=“de”>  <xdb:caption>Produkte</xdb:caption>   <xdb:variant name=“ch”>   <xdb:caption>Produkte (CH)</xdb:caption>   </xdb:variant> </xdb:variant> </xdb:resource>

[0091] Special Properties

[0092] Note that the paths in the examples above were also shared andcollapsed. The way post renderer 210 handles this is by understandingcertain special properties, which support path remapping.

[0093] The two special properties understood by the XSP processor 202are:

[0094] xdb:src—a file being used as the source of some data or imagefile; and

[0095] xdb:href—a link to a physical resource such as a web page.

[0096] The naming of these properties was taken from HTML, which usesthese names as attributes on image and anchor (link) elementsrespectively.

[0097] When post renderer 210 has a value for one of these propertiesfrom folder default or class definition, and the actual resource thengoes to override it, post renderer 210 uses path remapping rules toremap the current value of the property to the new value by treating thenew value as a relative path.

[0098] While the present invention is described in the context of afully functional computer system, those skilled in the art willappreciate that the present invention is capable of being distributed asa program product in a variety of forms, and that the present inventionapplies equally regardless of the particular type of signal bearingmedia used to actually carry out the distribution. Examples of signalbearing media include: recordable type media such as floppy disks andCD-ROM, transmission type media such as digital and analogcommunications links, as well as other media storage and distributionsystems.

[0099] The present invention thus provides a database structure that maybe utilized with the XSP language to extend XML's capabilities, i.e., todraw content and images from a variety of sources into one XML document.XSP processor 202 associated with the present invention interprets thecontrol language and performs substitutions for and additions to contentand style information in the script. The present invention furtherincludes features for reducing duplication of data by providing controlstatements that access display information in one location that iscommon to several resources. The display information may include all orjust a portion of content and image information for resources.

[0100] The present invention advantageously allows web page developersand other content providers to switch from editing numerous markuplanguage files to implement a change to creating data forms usingscripts that retrieve data and style information from common sourceswhere possible. The present invention provides facilities forcoordinating content and style development, and relieves developers fromhaving to manually edit numerous files when a change is desired ineither format or content, since the change may be made in XDB 201 thatare referenced by XSP scripts and retrieved by data gathering process204 and style sheet builder process 206. Developers responsible forproviding content and styles that are unique to their individualenvironments may be given access to combine their own unique informationand format where desired, and use shared information otherwise. Further,even when unique information is required, the present invention providesfacilities (i.e., user scripts) that allow the information to be locatedin one location and used by all developers requiring access to it. Thesharing of content and style information also facilitates presentationof up-to-date information in consistent formats.

[0101] While the invention has been described with respect to theembodiments and variations set forth above, these embodiments andvariations are illustrative and the invention is not to be consideredlimited in scope to these embodiments and variations. Accordingly,various other embodiments and modifications and improvements notdescribed herein may be within the spirit and scope of the presentinvention, as defined by the following claims.

What is claimed is:
 1. A method for generating an XML documentcomprising: generating a first file, the first file including one ormore control statements, the one or more control statements reference atleast one first resource, the first resource containing displayinformation; executing a script, the script having a control statementreferencing the first file, the execution of the script generating theXML document.
 2. The method of claim 1, wherein the step of executing isperformed by a server pages processor.
 3. The method of claim 1, whereinthe at least one first resource resides in at least two differentlocations in a computer system network.
 4. The method of claim 1,wherein default display information is kept in the first resource. 5.The method of claim 4, wherein additional display information may beadded to the default display information to form display information. 6.The method of claim 5, wherein the additional display information is forsecond resources in a computer system network.
 7. A method forgenerating an XML document comprising: defining a resource class that isassociated with at least one resource; providing default displayinformation for the resource class in a first location; including thedefault display information with display information for a secondresource that is associated with the resource class; and generating theXML document with the second resource.
 8. A method for generating an XMLdocument comprising: generating a marker resource, the marker resourceassociating a name with one or more second resources; associating a linkwith the marker resource, the link referring to at least one of the oneor more second resources; and providing display information in the atleast one of the one or more second resources; wherein two or moresecond resources can access the display information in the at least oneof the one or more second resources, the display information composing aportion of the XML document.
 9. The method of claim 8, furthercomprising: defining a variant for the at least one of the one or moresecond resources, the variant providing a reference to override displayinformation for the at least one of the one or more second resources.10. A computer system comprising: a processor; a nonvolatile memorycoupled to the processor; a data bus connected between the processor andthe nonvolatile memory wherein the processor is operable to executeprogram instructions for generating an XML document, the programinstructions including: first program instructions operable to execute ascript, the script including at least one control statement foraccessing display information, wherein the at least one controlstatement specifies at least one file, the at least one file providinginformation for accessing a plurality of resources for displayinformation; and second program instructions operable to generate theXML document using the display information from the plurality ofresources.
 11. The computer system of claim 10 further comprising: thirdprogram instructions operable to access a second file having a pluralityof control statements for accessing a plurality of resources containingdisplay information; and fourth program instructions operable to executecontrol statements in the second file for defining default displayinformation, wherein the default display information is included withthe display information for at least one of the resources.
 12. Thecomputer system of claim 10 further comprising: third programinstructions operable to execute control statements defining a class ofresource; fourth program instructions operable to execute controlstatements for associating the class of resource with at least oneresource; fifth program instructions operable to execute controlstatements for providing default display information for the class ofresource; and sixth program instructions operable to execute controlstatements for including the default display information with thedisplay information for each resource associated with the class.
 13. Thecomputer system of claim 10 further comprising: third programinstructions operable to execute control statements defining a markerresource that associates a name with the at least one resource, fourthprogram instructions operable to execute control statements furtherassociating a link with the marker resource, and fifth programinstructions operable to execute control statements further specifyingthe link when referring to the at least one resource, wherein at leasttwo resources refer to the link to access the display information forthe at least one resource.
 14. The computer system of claim 10 furthercomprising: third program instructions operable to execute controlstatements defining a variant for the at least one resource, wherein thevariant provides a reference to override display information for the atleast one resource.
 15. The computer system of claim 10 furthercomprising: third program instructions operable to execute controlstatements for remapping the location of the display information.
 16. Acomputer program product for generating an XML document in a computersystem, the computer program product comprising: a server pagesprocessor, the server pages processor including: first programinstructions operable to execute a script, the script including at leastone control statement for accessing display information, wherein the atleast one control statement specifies at least one file, the at leastone file providing information for accessing a plurality of resourcesfor display information; and second program instructions operable togenerate the XML document using the display information from theplurality of resources.
 17. The computer program product of claim 16further comprising: third program instructions operable to access asecond file having a plurality of control statements for accessing aplurality of resources containing display information; and fourthprogram instructions operable to execute control statements in thesecond file for defining default display information, wherein thedefault display information is included with the display information forat least one of the resources.
 18. The computer program product of claim16 further comprising: third program instructions operable to executecontrol statements defining a class of resource; fourth programinstructions operable to execute control statements for associating theclass of resource with at least one resource; fifth program instructionsoperable to execute control statements for providing default displayinformation for the class of resource; and sixth program instructionsoperable to execute control statements for including the default displayinformation with the display information for each resource associatedwith the class.
 19. The computer program product of claim 16 furthercomprising: third program instructions operable to execute controlstatements defining a marker resource that associates a name with the atleast one resource, fourth program instructions operable to executecontrol statements further associating a link with the marker resource,and fifth program instructions operable to execute control statementsfurther specifying the link when referring to the at least one resource,wherein at least two resources refer to the link to access the displayinformation for the at least one resource.
 20. The computer programproduct of claim 16 further comprising: third program instructionsoperable to execute control statements defining a variant for the atleast one resource, wherein the variant provides a reference to overridedisplay information for the at least one resource.
 21. The computerprogram product of claim 16 further comprising: third programinstructions operable to execute control statements for remapping thelocation of the display information.
 22. A computer system forgenerating XML documents comprising: a processor, the processorconstructed and arranged to execute program instructions; an XSPprocessor, the XSP processor constructed and arranged to generate afirst XSP script; an XDB; a data gathering process executed on theprocessor, the data gathering process receiving input from the XSPprocessor and the XDB, the data gathering process constructed andarranged to generate an XML meta-document; a stylesheet builder executedon the processor, the stylesheet builder receiving input from the XSPprocessor and the XDB, the stylesheet builder constructed and arrangedto generate an XSL document; an XSL transform process executed on theprocessor, the XSL transform process receiving the XML meta-document andthe XLS document as input, the XSL transform constructed and arranged togenerate an XML document; and a post renderer, the post rendererexecuting on the processor, the post renderer constructed and arrangedto receive the XML document as input and to generate an output document.